{{ template "header" . }}

<!-- Breadcrumb -->
<ol class="breadcrumb">
  <li class="breadcrumb-item"><a href="/">Home</a></li>
  <li class="breadcrumb-item"><a href="{{ Url "volume-list" }}">Volumes</a></li>
  <li class="breadcrumb-item"><a href="{{ Url "volume-list" }}?node={{ .Volume.NodeId }}">{{ .Volume.NodeId }}</a></li>
  <li class="breadcrumb-item"><a href="{{ Url "volume-list" }}?node={{ .Volume.NodeId }}&pool={{ .Volume.Pool }}">{{ .Volume.Pool }}</a></li>
  <li class="breadcrumb-item"><a href="{{ Url "volume-list" }}?node={{ .Volume.NodeId }}&pool={{ .Volume.Pool }}#{{ .Volume.Name }}">{{ .Volume.Name }}</a></li>
  <li class="breadcrumb-item active">Resize</li>
</ol>

<div class="container">
  <div class="row">
    <div class="col-md-12">
      <div class="card">
        <div class="card-body">
          <h4>Resize Volume {{ .Volume.Path }}</h4>
          <br>
          <form class="JS-ReactiveForm" method="post" action="">{{ CSRFField .Request }}
            <div class="form-group row">
              <div class="col-md-12">
                <label>New Volume Size</label>
                <div class="input-group">
                  <input required="required" class="form-control" name="SizeValue" min="1" id="Size" type="number" value="{{ .Volume.Size.M }}">
                  <div class="input-group-append">
                    <select style="border-top-left-radius: 0; border-bottom-left-radius: 0;" name="SizeUnit" class="form-control">
                      <option value="B">B</option>
                      <option value="K">K</option>
                      <option selected value="M">M</option>
                      <option value="G">G</option>
                    </select>
                  </div>
                </div>
                <small class="form-text text-muted">Volume size can only be increased, current size is
                  {{ .Volume.Size.M }}M</small>
              </div>
            </div>

            <div class="form-group row">
              <div class="col-md-12">
                <button class="btn btn-primary" data-loading="<i class='icon-refresh icons'></i> Resizing volume..."
                  type="submit">Resize volume</button>
              </div>
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>
</div>
{{ template "footer" . }}
